#include<bits/stdc++.h>
using namespace std;
bool __st;
typedef long long ll;
const int N=309,M=2e5+9999;
int n,m,q,s,ss,t;
ll f[N][N],ans[N];
int in[N],out[N],cntid;
struct edge{
    int v,w; ll c; int nxt;
}edg[M];
int cntedge=1,hd[2*N];
void add(int u,int v,int w,ll c){
    cntedge++;
    edg[cntedge]=(edge){v,w,c,hd[u]};
    hd[u]=cntedge;
}
ll d[N*2],allflow,allcost;
int from[N*2],vis[N*2];
bool spfa(){
    memset(d,0x3f3f3f3f,sizeof(d));
    memset(vis,0,sizeof(vis));
    queue<int> que;
    d[s]=0; que.push(s); vis[s]=1;
    int u,v,w; ll c;
    while(!que.empty()){
        u=que.front(); que.pop(); vis[u]=0;
        for(int i=hd[u];i;i=edg[i].nxt){
            v=edg[i].v; w=edg[i].w; c=edg[i].c;
            if(!w||d[v]<=d[u]+c) continue;
            d[v]=d[u]+c; from[v]=i;
            if(!vis[v]) que.push(v),vis[v]=1;
        }
    }
    return d[t]!=d[0];
}
void update(){
    ll cost=0;
    for(int u=t;u!=s;u=edg[from[u]^1].v){
        cost+=edg[from[u]].c;
        edg[from[u]].w--; edg[from[u]^1].w++;
    }
    allcost+=cost; allflow++;
    return;
}
bool __ed;
int main(){
    freopen("journey.in","r",stdin);
    freopen("journey.out","w",stdout);
    std::ios::sync_with_stdio(false);
    cin.tie(0);
//    cerr<<fixed<<setprecision(3)<<(double)(&__st-&__ed)/(1<<20)<<"MB"<<endl;
    cin>>n>>m>>q;
    memset(f,0x3f3f3f,sizeof(f));
    for(int i=1;i<=n;i++) f[i][i]=0;
    int u,v; ll w;
    for(int i=1;i<=m;i++){
        cin>>u>>v>>w;
        f[u][v]=min(f[u][v],w);
    }
    for(int k=1;k<=n;k++)
        for(int i=1;i<=n;i++) if(f[i][k]!=f[0][0])
            for(int j=1;j<=n;j++)
                f[i][j]=min(f[i][j],f[i][k]+f[k][j]);
    for(int i=1;i<=n;i++)
        in[i]=++cntid,out[i]=++cntid;
    s=++cntid; ss=++cntid; t=++cntid;
    for(int i=1;i<=n;i++){
        add(ss,in[i],1,0);
        add(in[i],ss,0,0);
        for(int j=1;j<=n;j++){
            if(i==j||f[i][j]==f[0][0]) continue;
            add(in[i],out[j],1,f[i][j]);
            add(out[j],in[i],0,-f[i][j]);
        }
        add(out[i],t,1,0);
        add(t,out[i],0,0);
    }
    add(s,ss,1,0);
    add(ss,s,0,0);
    memset(ans,0x3f3f3f3f,sizeof(ans));
    ans[n]=0;
    for(int i=n-1;i>=0;i--){
        if(spfa()) update();
        else break;
        ans[i]=allcost;
        edg[cntedge-1].w++;
    }
    ll c,res;
    while(q--){
        cin>>c;
        res=c*n;
        for(int i=0;i<n;i++)
            res=min(res,ans[i]+c*i);
        cout<<res<<'\n';
    }
//    cerr<<fixed<<setprecision(3)<<(double)clock()/CLOCKS_PER_SEC;
    return 0;
}